import * as actionTypes from '../constants/detail';

import {fromJS} from "immutable";

const defaultState = fromJS({
    title: "",
    imgUrl: "",
    content: ""
});

export default (state = defaultState, action) => {
    switch (action.type) {

        case actionTypes.GET_DETAIL_LIST:
            return state.merge({
                title: action.title,
                imgUrl: action.imgUrl,
                content: action.content
            });

        default:
            return state;
    }
}